package com.lagou.dao;

import com.lagou.utils.DruidUtils;
import org.apache.commons.dbutils.QueryRunner;

import java.sql.SQLException;
import java.util.Date;

public class StudentDao {
    public void add(int id, String name, String sex, Date datebirthday) throws SQLException {

        QueryRunner queryRunner = new QueryRunner(DruidUtils.getDataSource());
        String sql = "insert into student values (?,?,?,?)";
        Object[] param = {id, name, sex, datebirthday};
        queryRunner.update(sql, param);
    }
}
